﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Solver.Common
{
    /// <summary>
    /// Jeden uzel
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public sealed class Node<T>
    {
        /// <summary>
        /// Hodnota v uzlu
        /// </summary>
        public T Value { get; private set; }

        /// <summary>
        /// Další uzel
        /// </summary>
        public Node<T> Next { get; internal set; }

        /// <summary>
        /// Předchozí uzel
        /// </summary>
        public Node<T> Previous { get; internal set; }

        /// <summary>
        /// Nastavime hodnotu
        /// </summary>
        /// <param name="item">Nastavime hodnotu</param>
        internal Node(T item)
        {
            this.Value = item;
        }
    }
}
